#include "Guest.h"
//#include "Restaurant.h"
//#include "Restaurant.h"
#include <iostream>
#include <string>
//class Restaurant;
using namespace std;

//This is a counter to assign a unique guest number for each guest
// A static member is initialized in the .cpp file
int Guest::uniqueCounter= 0;

//Default Constructor
Guest::Guest() {
	hasOrder = false;
}

//Destructor
Guest::~Guest() {}

//Copy Constructor
Guest::Guest(const Guest& g){
	this->guestNum = Guest::getUniqueCounter();
	Guest::IncUniqueCounter();
	this->O = g.O;
}
//Operator '=' Overloading
const Guest& Guest::operator=(const Guest& g) { 
	if (this!=&g) { 
		this->assign(g);
	}
	return *this;
}

//Constructor
Guest::Guest(const string fc,const string mc,const string des,const string bev) {
	Order o1(fc,mc,des,bev);
	this->O = o1;
	this->guestNum = Guest::getUniqueCounter();
	Guest::IncUniqueCounter();
}


//This function will be used for the = overloading
const Guest& Guest::assign(const Guest& g) {
	this->O = g.O;
	this->guestNum = g.guestNum;
	return *this;
}

//Returns the uniqueCounter value
const int Guest::getUniqueCounter(){
	return Guest::uniqueCounter;
}
//sets the uniqueCounter value
void Guest::IncUniqueCounter(){
	Guest::uniqueCounter++;
}

//Returns the guest number
const int Guest::getGuestNum()const { 
	return this->guestNum;
}
//sets the guest number
const void Guest::setGuestNum(const int i){ 
	guestNum = i;
}
//gets the private boolean hasOrder
const bool Guest::getHasOrder() const  { 
	return this->hasOrder;
}
//sets the private boolean hasOrder
const void Guest::setOrderBool(const bool b)   { 
	 this->hasOrder = b;
}
/*--------------------------------Beverage Code--------------------------------------------*/
//sets the guest's beverage
const void Guest:: setBeverage(const string newbev) {
	O.setBeverage(newbev);
}
//erases the guest's beverage
const void Guest:: eraseBeverage() {
	O.setBeverage("");
}
//returns the guest's beverage
const string Guest::getBeverage() const { 
	return O.getBeverage();
}
/*--------------------------------First Course Code--------------------------------------------*/
//sets the guest's first course
const void Guest:: setFirstCourse(const string newfc) {
	O.setFirstCourse(newfc);
}
//erases the guest's first course
const void Guest:: eraseFirstCourse() {
	O.setFirstCourse("");
}
//returns the guest's first course
const string Guest::getFirstCourse() const { 
	return O.getFirstCourse();
}
/*--------------------------------Main Course Code--------------------------------------------*/
//sets the guest's main course
const void Guest:: setMainCourse(const string newmc) {
	O.setMainCourse(newmc);
}
//erases the guest's main course
const void Guest:: eraseMainCourse() {
	O.setMainCourse("");
}
//returns the guest's main course
const string Guest::getMainCourse() const { 
	return O.getMainCourse();
}

/*--------------------------------Desert Code--------------------------------------------*/
//returns the guest's desert
const void Guest:: setDesert(const string des) {
	O.setDesert(des);
}
//erases the guest's desert
const void Guest:: eraseDesert() {
	O.setDesert("");
}
//returns the guest's desert
const string Guest::getDesert() const { 
	return O.getDesert();
}
/*----------------------------------------------------------------------------------------*/


